package com.mx.pojo.VO;

import com.mx.pojo.Article;
import lombok.Data;
import lombok.ToString;

import java.util.Date;

@Data
@ToString
public class ArticleVO{
    Integer id;
    Integer uid;
    Integer agree;
    String name;
    String title;
    String content;

    String image;
    Date date;

    public boolean isStar;
    public boolean isAgree;

    public ArticleVO(Article article,String name){
        this.id=article.getId();
        this.uid=article.getUid();
        this.agree=article.getAgree();
        this.name=name;
        this.title=article.getTitle();
        this.content=article.getContent();
        this.image=article.getImage();
        this.date=article.getDate();
    }
    public ArticleVO(Article article,String name,boolean isStar,boolean isAgree){
        this.id=article.getId();
        this.uid=article.getUid();
        this.agree=article.getAgree();
        this.name=name;
        this.title=article.getTitle();
        this.content=article.getContent();
        this.image=article.getImage();
        this.date=article.getDate();
        this.isStar=isStar;
        this.isAgree=isAgree;
    }
}